package com.example.project.service;


import com.example.project.entity.User;
import com.example.project.result.Result;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;


public interface IUserService {
    Result updateUserInfo(HttpServletRequest request, HttpServletResponse response, int userId, User user);
    Result register(User user, String emailCode, String captchaCode, String captchaKey, HttpServletRequest request);


    void createCaptcha(HttpServletResponse response, String captchaKey) throws Exception;

    Result getUserInfo(int userId);


    Result checkEmail(String email);


    Result deleteUserById(Long userId, HttpServletRequest request, HttpServletResponse response);

    Result checkUserName(String userName);

    Result doLogin(String captcha, String captchaKey, User user, HttpServletRequest request, HttpServletResponse response);

    User getByUserName(String username);

    Result updatePassword(User user);

    Result updateEmail(String email,String verifyCode,User user);

    Result reSetPassword(Long userId);

    Result checkEmailCode(String email, String emailCode);

    Result changeUserState(Long userId,int state);

  }
